package com.woniu.zsd.merchant.mapper;

import cn.hutool.core.date.DateTime;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.woniu.dto.NoticeListDto;
import com.woniu.zsd.merchant.entity.Notice;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author author
 * @since 2025-03-27
 */
@Mapper
public interface NoticeMapper extends BaseMapper<Notice> {

    Page<NoticeListDto> noticeList(@Param("page") Page<NoticeListDto> page,
                                   @Param("title") String title,
                                   @Param("startTime") DateTime startTime,
                                   @Param("endTime") DateTime endTime,
                                   @Param("state") Integer state);

    List<NoticeListDto> draftNotice(Integer adminId);
}
